package main

import (
	"heap"
	"math/rand"
	"time"
)

func main()  {
	rand.Seed(time.Now().UTC().UnixNano())
	h := heap.Heap{make([]int, 100000), 0}
	for i := 0; i < 100; i++ {
		v := int(rand.Int())
		h.Insert(v)
		// h.Print()
	}
	for i := 0; i < 100; i++ {
		println(h.DelMax())
		// h.Print()
	}
}
